import Mock from 'mockjs'
import { defineMock } from 'vite-plugin-mock-dev-server'

export default defineMock([
    {
        url: '/mock/test',
        method: 'GET',
        body: {
            code: 200,
            message: 'success',
            data: Mock.mock({
                'list|1-10': [{
                    'id|+1': 1,
                    'name': '@cname',
                    'content': '@csentence'
                }]
            })
        },
        enabled: true // 是否开启当前 mock  默认开启
    }
])